package com.ygqh.baby.service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.ygqh.baby.ao.Message;
import com.ygqh.baby.ao.OrderStatus;
import com.ygqh.baby.ao.PayType;
import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.ao.ResultSet;
import com.ygqh.baby.po.ActionOrder;
import com.ygqh.baby.po.ActionOrder.PickWay;
import com.ygqh.baby.po.ActionProduct;

public interface ActionOrderService {

	List<ActionOrder> find();

	int findCount();

	ActionOrder findById(Long id);

	int deleteSoft(Long[] ids);

	int deleteSoft(Long id);

	int save(ActionOrder actionOrder);

	int update(ActionOrder actionOrder);

	int saveOrUpdate(ActionOrder actionOrder);

	ResultSet<ActionOrder> search(QueryInfo queryInfo, String q);

	Map<String, Object> selectSalesReport(Long actionId, Date startDate, Date endDate);

	List<Map<String, Object>> selectSalesReportALL(Long actionId);

	Message saveOrder(Long userId, List<ActionProduct> productList, BigDecimal totalPrice, PayType payType, OrderStatus orderStatus, PickWay pickWay,
			String remark);

	ActionOrder findByOrderId(String orderId);

	int updateOrderStatusByPaySuccess(String orderId);

	List<ActionOrder> findOrderListHasDetail(Long actionId, Long userId, OrderStatus orderStatus);

	int updateOrderToClose(Long actionId, Date startDate, Date endDate);

}
